pathbar: Implement clipping
authorBenjamin Otte <otte@redhat.com>
Tue, 15 Jul 2014 12:35:32 +0000 (14:35 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 15 Jul 2014 12:36:04 +0000 (14:36 +0200)
.. so the path bar's buttons can have shadows.

gtk/gtkpathbar.c

index 599f170f8ef9a1ac538fb0dbd63a4133347ab690..adb9a8f6fa42710965bb44a04a5d57d703d94d09 100644 (file)
@@ -549,7 +549,11 @@ gtk_path_bar_size_allocate (GtkWidget     *widget,
 
   /* No path is set; we don't have to allocate anything. */
   if (path_bar->priv->button_list == NULL)
-    return;
+    {
+      _gtk_widget_set_simple_clip (widget);
+
+      return;
+    }
 
   direction = gtk_widget_get_direction (widget);
   allocation_width = allocation->width;
@@ -767,6 +771,8 @@ gtk_path_bar_size_allocate (GtkWidget     *widget,
 
   if (needs_reorder)
     child_ordering_changed (path_bar);
+
+  _gtk_widget_set_simple_clip (widget);
 }
 
 static void